#coding:utf-8
from django.shortcuts import render,render_to_response
from django.http import HttpResponseRedirect,HttpResponse
from django.template import RequestContext
from django.core.paginator import Paginator
from django.contrib.auth.decorators import login_required
# Create your views here.
#
def index(request):
    return render_to_response('p_index.html')

def detect(request):
    from mlmodels.kwmodels import kwdetect_url
    url = request.POST.get('url','')
    res = kwdetect_url(url)
    return HttpResponse(str(res))
